import request from '@/utils/suguang.js'
// import {interfaceUtils} from '../model/interface'


//获取 后台 的信息是否 绑定
// http://app.gzsg.cn/sgmx/gzh/isBind?openid=o6eoGj58yFkPMAcstFIrvkiwXa30
export function isBind(param){
  return request({
    url: "/sgmx/gzh/isBind?openid="+param.openid,
    method: 'get',
    
  })


}




// 登录
export function login(param) {
  return request({
    url: "/sgmx/gzh/getopenid?url="+param.url+"&code="+param.code,
    method: 'get',
    
  })
}

// 登录绑定
export function bindCustomerInfo(data={}) {
  return request({
    url: "/sgmx/gzh/bindCustomerInfo",
    method: 'get',
    params: data
  })
}


// 登录获取验证码
export function getCode(data={}) {
  return request({
    url: "/sgmx/login/getCode",
    method: 'get',
    params: data
  })
} 





//获取档案 (治疗信息)

// http://49.234.94.134:8083/sgmx/customer/getCustomerInfo?customerCrmId=SGC00480406
export function getArchives(param) {
  return request({
    url: "/sgmx/customer/getCustomerTreatInfo?customerCrmId="+param.customerCrmId,
    method: 'get',
 })
}

// 获取个人信息
// http://49.234.94.134:8083/sgmx/customer/getCustomerInfo?customerCrmId=SGC00480406

export function getUserInfo(param){
  return request({
    url: "/sgmx/customer/getCustomerInfo?customerCrmId="+param.customerCrmId,
    method: 'get',
 })
}

//获取账单

// http://49.234.94.134:8083/sgmx/customer/getCustomerOrderInfo?customerCrmId=SGC00480406
export function getBillInfo(param){

  return request({
    url: "/sgmx/customer/getCustomerOrderInfo?customerCrmId="+param.customerCrmId +"&date="+param.date,
    method: 'get',
 })

}

//  获取体检报告

// http://app.gzsg.cn/sgmx/customer/getCustomerCheckInfo?customerCrmId=20170902082453129000&checkType=2

export function getReportBlood(param){
  
  return request({
    url: "/sgmx/customer/getCustomerCheckInfo?customerCrmId="+param.customerCrmId +"&checkType="+param.checkType,
    method: 'get',
 })
}

// 报告详情 

// http://app.gzsg.cn/sgmx/customer/getCustomerCheckDetail?V_BRBM=202112230051
export function getDetal(param){

  return request({
    url: "/sgmx/customer/getCustomerCheckDetail?V_BRBM="+param.V_BRBM,
    method: 'get',
 })

}

// 列表
export function getDeptSchedulerInfo(data={}){
    return request({
       url:"/sgmx/scheduler/getDeptSchedulerInfo",
       method: 'get',
       data
    })
}

// 提交预约
export function submitDeptSchedulerInfo(data={}){
  return request({
     url:"/sgmx/scheduler/submitDeptSchedulerInfo",
     method: 'post',
     data
  })
}


// 礼品登记  获取礼品列表
export function getGiftList(data={}){
//https://app.gzsg.cn/sgmx/activity/getActivityItems?hosId=1
  return request({
    url:"/sgmx/activity/getActivityItems?hosId=1",
    method: 'get',
    // data
  })
}


// 获取礼品二维码
export function getGiftCode(data={}){
  //https://app.gzsg.cn/sgmx/activity/activityList?hosId=1&customerId=20181208113409024000&act_id=1

  //https://app.gzsg.cn/sgmx/activity/activityList?hosId=1&customerId=20181208113409024000&act_id=1
  return request({
    url:"/sgmx/activity/activityList?hosId=1&"+"customerId="+data.customerId+"&act_id="+data.act_id,
    // url:"/sgmx/activity/activityList?hosId=1&"+"customerId="+'20181208113409024000'+"&act_id="+'1',
    method: 'get',
    // data
  })


}





